package com.say.utils;

import java.io.File;
import java.io.FileNotFoundException;

import org.springframework.util.ResourceUtils;

public class SysParentFile {
	
	public static String getParentFile() {
		File path = null;
	    try {
	    	path = new File(ResourceUtils.getURL("classpath:").getPath());
	    } catch (FileNotFoundException e) {
	    	e.printStackTrace();
	    }
		String gitPath=path.getParentFile().getParentFile().getParent()+File.separator+"static"+File.separator+"upload";
		gitPath=gitPath.replaceAll("file:", "");
		System.out.println(gitPath);
	    File f = new File(gitPath);
        if (!f.exists()) {
            f.mkdirs();
        }
		return gitPath;
	}

}
